package com.lyrcsoft.mapstruct.convert;

import com.lyrcsoft.mapstruct.cmd.UserDetailRequest;
import com.lyrcsoft.mapstruct.cmd.UserRequest;
import com.lyrcsoft.mapstruct.vo.UserVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * @author fujc2dev@126.com
 * @version 1.0
 * @date 2025/9/19 10:55
 */
@Mapper
public interface UserConvert {
    public static final UserConvert INSTANCE = Mappers.getMapper(UserConvert.class); // <2>

    UserRequest convert(UserVo userDO);

    @Mappings({
        @Mapping(source = "id", target = "userId")
    })
    UserDetailRequest convert(UserRequest userRequest);
}
